Home:ALL Converter>Make presented view controller to ignore and pass through touch events

Make presented view controller to ignore and pass through touch events

Ask Time:2018-11-15T21:16:39         Author:えるまる

Json Formatter

edit: I want to make this view independent to be reusable.

The question explains itself. I have searched, but didn't find any answers, even if the question seems to be common.

I have two view controllers VC1 and VC2. My code is like:

VC1.present(VC2, animated: true)

Then, I need my VC2 to totally ignore all touches and pass them through.

Good example is AppStore rating success alert (attached). You can scroll even when alert is presented, I need the same behavior. enter image description here

Author:えるまる,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/53320360/make-presented-view-controller-to-ignore-and-pass-through-touch-events
yy